package InputStream;import java.io.IOException;import java.io.PipedInputStream;import java.io.PipedOutputStream;public class PipedStreamDemo {    public static void main(String[] args) throws IOException {        PipedOutputStream pos = new PipedOutputStream();        //输出流        PipedInputStream pis = new PipedInputStream(pos);       //输入流与输出流连接起来        byte datamover = 0;        System.out.println("\nNow I start to work...\n");        try{            System.out.println("transfer " + datamover + " to pos.\n");            pos.write(datamover);            System.out.println("pis get:" + (byte)pis.read());        } finally {            pis.close();            pos.close();        }    }}